function bezier3(starp,con1,con2,endp)
for t= 0:0.001:1;
x = (1-t).^3*starp(1)+ 3*t.*(1-t).^2*con1(1)+3*t.^2*(1-t)*con2(1)+t.^3*endp(1);
y = (1-t).^3*starp(2)+ 3*t.*(1-t).^2*con1(2)+3*t.^2*(1-t)*con2(2)+t.^3*endp(2);
plot(x,y,'r')
hold on;
% plot([starp(1) con1(1) con2(1) endp(1)],[starp(2) con1(2) con2(2) endp(2)],'b');
% hold on;
end
